With the development of Internet, terminals such as mobile phones and smart wearable devices have also been developed rapidly. Various Internet applications may be installed and operated in a terminal, and include, but are not limited to, an instant messaging application, a security application, and an input method application. Users may use the Internet applications in the terminal to satisfy various requirements such as social networking and information input of the users. Generally, an Internet application in a terminal can perform convenient management such as encryption and decryption on data in the terminal. For example, a security application in a terminal may manage a private picture in the terminal by using an encrypted album; or a security application in a terming may manage a private document by using an encrypted file. Currently, a numeric password method is usually used to access encrypted data in a terminal. For example, a user may set a numeric password for an encrypted album in a security application in a terminal, and view, delete, or modify a private picture in the encrypted album or perform another access operation on the private picture by entering the correct numeric password. However, in a data processing solution based on a numeric password access method, to access encrypted data each time, a user needs to enter a multi-digit numeric password. Such an operation is complex, and users often fail to access encrypted data because numeric passwords may be lost or forgotten.